function retrieve_data(){
    var data = {};
    data['id']= $('#modify_bookid').val();
    data['barcode']= $('#modify_barcode').val();
    data['bookname']= $('#modify_bookname').val();
    data['typeid']= $('#modify_typeid').val();
    data['author']= $('#modify_author').val();
    data['authorcomtroy']= $('#modify_authorcomtroy').val();
    data['translator']= $('#modify_translator').val();
    data['ISBN']= $('#modify_ISBN').val();
    data['price']= $('#modify_price').val();
    data['bookcase']= $('#modify_bookcase').val();
    data['bookcotent']= $('#modify_bookcotent').val();
    return data
}
function modifyBook(){
    var url = '/modify/updatebook';
    var data = retrieve_data();
    var success = function () {
        location.href = '/gallery_books_page/gallery_books_page'
    };
    var error = function () {
        alert("失败");
    };
    post_ajax(url, data, success, error);
}
function modifyPblish(){
    var url = '/modify/updatepblish';
    var data = return_data();
    var success = function () {
        location.href = '/gallery_books_page/gallery_pblish'
    };
    var error = function () {
        alert("失败");
    };
    post_ajax(url, data, success, error);
}
function return_data(){
    var data = {};
    data['id'] = $('#modify_pblish_id').val();
    data['ISBN']= $('#modify_ISBN_info').val();
    data['pubname']= $('#modify_pubname').val();
    data['pubaddr']= $('#modify_pubaddr').val();
    data['Zip_code']= $('#modify_Zip_code').val();
    data['first_pubtel']= $('#modify_first_pubtel').val();
    data['second_pubtel']= $('#modify_second_pubtel').val();
    data['pubperson']= $('#modify_pubperson').val();
    return data
}
function modifytype(){
    var url = '/modify/updatetype';
    var data = back_data();
    var success = function () {
        location.href = '/gallery_books_page/gallery_book_type'
    };
    var error = function () {
        alert("失败");
    };
    post_ajax(url, data, success, error);
}
function back_data(){
    var data = {};
    data['id'] = $('#modify_type_id').val();
    data['booktypeid'] = $('#modify_booktypeid').val();
    data['Typename']= $('#modify_Typename').val();
    data['Type_outline']= $('#modify_Type_outline').val();
    return data
}